import instacne from "../request";
import type { Ref } from "vue";
import qs from "qs"
deleteList
/**
 * 登录返回数据
 */
interface IAdminLoginParams {
  password: string;
  username: string;
}
interface IAdminLoginRes {
  tokenHead: string;
  token: string;
}
const adminLogin = (data: IAdminLoginParams): Promise<IAdminLoginRes> => {
  // instacne.post("/auth/login", data); 是一个 Promise 类型
  return instacne.post("/admin/login", data);
};

/**
 * 获取当前登录用户信息
 */
interface IAdminInfoRes {
  menus: IMneuItem[];
  icon: string;
  username: string;
  roles: string[];
}
const getAdminInfo = (): Promise<IAdminInfoRes> => {
  return instacne.get("/admin/info");
};
interface IAdminziyuanRes {
  categoryId: number,
  createTime: string,
  description: string,
  id: number,
  name: string,
  url: string
}

/**
 * /admin/list 根据用户名或者姓名获取用户列表
 */
interface IAdminListParams {
  keyword?: string | Ref<string>;
  pageNum?: number | Ref<number>;
  pageSize?: number | Ref<number>;
  name?: string | Ref<string>;
  type?: number | Ref<number>;
}
interface IAdminListItem {
  createTime: string;
  email: string;
  icon: string;
  id: number;
  loginTime: string;
  nickName: string;
  note: string;
  password: string;
  status: number;
  username: string;
  name: string;
}
createItem
interface IAdminListRes {
  list: IAdminListItem[];
  pageNum: number;
  pageSize: number;
  total: number;
  totalPage: number;
}
interface IOrdersetting {
  id: number;
  code: number;
  data: {
    commentOvertime: number;
    confirmOvertime: number;
    finishOvertime: number;
    flashOrderOvertime: number;
    id: number;
    normalOrderOvertime: number;
  };
  message: string;
}
interface IAdvertise {
  code: number;
  data: {
    list: [
      {
        clickCount: number;
        endTime: string;
        id: number;
        name: string;
        note: string;
        orderCount: number;
        pic: string;
        sort: number;
        startTime: string;
        status: number;
        type: number;
        url: string;
      }
    ];
    pageNum: number;
    pageSize: number;
    total: number;
    totalPage: number;
  };
  message: string;
}
IAdminDelete
interface IAdminAdd {
  name: string;
  id: number;
}
interface IAdminziyuanRes {
  categoryId: number;
  createTime: string;
  description: string;
  id: number;
  name: string;
  url: string;
}

// 文件上传的接口
interface IMinioDelete {
  code: number,
  data: any,
  message: string
}

const getAdminList = (
  data?: IAdminListParams | any
): Promise<IAdminListRes> => {
  return instacne.get("/admin/list", {
    params: data,
  });
};
/**
 * 新增用户
 * admin/register
 */
const adminRegister = (data: IAdminListItem): Promise<IAdminListItem> => {
  return instacne.post("/admin/register", data);
};
/**
 * /admin/update/{id}
 *  修改指定用户信息
 */
const adminUpdate = (data: IAdminListItem) => {
  return instacne.post(`/admin/update/${data.id}`, data);
};
// 获取资源列表
const adminziyuanList = (): Promise<IAdminInfoRes> => {
  return instacne.get("/resource/listAll");
};
// 秒杀活动详情/flash/list
// 获取活动详情

// Parameters
interface IAdminMSList {
  keyword?: string | Ref<string>;
  pageNum?: number | Ref<number>;
  pageSize?: number | Ref<number>;
}
interface IAdminmsList {
  createTime: string;
  endDate: string;
  id: number;
  startDate: string;
  title: string;
}
interface IAdminMsRes {
  list: any;
  pageNum: number;
  pageSize: number;
  total: number;
  totalPage: number;
}
const adminmsList = (data?: IAdminMSList): Promise<IAdminMsRes> => {
  return instacne.get("/flash/list", {
    params: data,
  });
};

// /attrInfo/{productCategoryId} 商品属性列表

const attribute = (data?: IAdminListParams): Promise<IAdminListRes> => {
  return instacne.get("/productAttribute/category/list", {
    params: data,
  });
};
// /productAttribute/create 商品属性添加
interface IAdminDelete {
  filterType: number;
  handAddStatus: number;
  inputList: string;
  inputType: number;
  name: string;
  productAttributeCategoryId: number;
  relatedStatus: number;
  searchType: number;
  selectType: number;
  sort: number;
  type: number;
}
// 添加属性列表
interface AdminAdd {
  name: string,
  id: number,
}
IAdminListRes
const adminAddForm = (data: AdminAdd): Promise<IAdminListItem> => {

  return instacne.post("/productAttribute/category/create", qs.stringify(data))
}
// 删除属性列表
const adminDeleteForm = (data: number): Promise<IAdminDelete> => {
  return instacne.get(`/productAttribute/category/delete/${data}`);
};
// 编辑属性列表
const adminListbj = (data: IAdminAdd): Promise<IAdminDelete> => {
  let datas = {
    name: data.name
  }
  return instacne.post(`/productAttribute/category/update/${data.id}`, qs.stringify(datas))
}

// 退货列表
const returnGoodsAll = (data?: IAdminListParams): Promise<IAdminListRes> => {
  return instacne.get("/returnReason/list", {
    params: data,
  });
};

// 添加退货请求
interface IAddReturnGoods {
  createTime: string;
  id: number;
  name: string;
  sort: number;
  status: number;
}

export const addReturnGoods = (
  data: IAddReturnGoods
): Promise<IAddReturnGoods> => {
  return instacne.post("/returnReason/create", data);
};

// returnReason/update/{id}
// 修改退货原因
const changeReturnGoods = (data: IAddReturnGoods): Promise<IAddReturnGoods> => {
  return instacne.post(`/returnReason/update/${data.id}`, data);
};

// 修改退货原因状态
interface IgoodsStatus {
  ids: number;
  status: number;
}
const changeReturnGoodsStatus = (data: IgoodsStatus): Promise<IgoodsStatus> => {
  return instacne.post(
    `/returnReason/update/status?status=${data.status}&ids=${data.ids}`
  );
};

// 删除退货原因
const delRouterGoods = (data: number): Promise<null> => {
  return instacne.post(`/returnReason/delete?ids=${data}`);
};
// /productAttribute/list/{cid} 商品属性列表
const AttributeList = (data: AttributeListItiem): Promise<IAdminListRes> => {
  console.log(data);

  return instacne.get(`/productAttribute/list/${data.cid}`, {
    params: {
      pageNum: data?.pageNum,
      pageSize: data?.pageSize,
      type: data?.type,
    },
  });
};
interface AttributeListItiem {
  cid?: number;
  pageNum?: number;
  pageSize?: number;
  type?: number;
}

// 添加商品属性

const AddGoods = (data: IAdminListItem): Promise<IAdminListItem> => {
  return instacne.post("/productAttribute/create", data);
};
interface AddGoodsItem {
  filterType: number;
  handAddStatus: number;
  inputList: string;
  inputType: number;
  name: string;
  productAttributeCategoryId: number;
  relatedStatus: number;
  searchType: number;
  selectType: number;
  sort: number;
  type: number;
}
// /productAttribute/list 参数列表
const CsList = (data: AttributeListItiem): Promise<AttributeListItiem> => {
  return instacne.post(`/productAttribute/list${data?.cid}`, {
    params: {
      pageNum: data?.pageNum,
      pageSize: data?.pageSize,
      type: data?.type,
    },
  });
};
// 角色列表
interface getAdminResources {
  keyword?: string | Ref<string>;
  pageNum?: number | Ref<number>;
  pageSize?: number | Ref<number>;
}
const getAdminallowMenu = (id: number): Promise<any[]> => {
  return instacne.get(`/role/listMenu/${id}`);
};
const getAdminRole = (data?: getAdminResources): Promise<IAdminListRes> => {
  return instacne.get("/role/list", {
    params: data,
  });
};
interface IRoleListItem {
  adminCount: number;
  createTime: string;
  description: string;
  id: number;
  name: string;
  sort: number;
  status: number;
}
//  角色列表新增
const rolesRegister = (data: IRoleListItem): Promise<IRoleListItem> => {
  return instacne.post("/role/create", data);
};

// /flash/update/status/{id}修改上下线状态

interface sxdata {
  id: number | Ref<number>;
  status: number | Ref<number>;
}
const changeSX = (data: sxdata) => {
  return instacne.post(`/flash/update/status/${data.id}?status=${data.status}`);
};

// 优惠卷列表 /coupon/list
const couponCouponsList = (data?: IAdminListParams | any): Promise<IAdminListRes> => {
  return instacne.get("/coupon/list", {
    params: data,
  });
};

// 添加优惠券
interface IAddCoupon {
  amount: number;
  code: string;
  count: number;
  enableTime: string;
  endTime: string;
  id: number;
  memberLevel: number;
  minPoint: number;
  name: string;
  note: string;
  perLimit: number;
  platform: number;
  productCategoryRelationList: [
    {
      couponId: number;
      id: number;
      parentCategoryName: string;
      productCategoryId: string;
      productCategoryName: string;
    }
  ];
  productRelationList: [
    {
      couponId: number;
      id: number;
      productId: number;
      productName: string;
      productSn: string;
    }
  ];
  publishCount: number;
  receiveCount: number;
  startTime: string;
  type: number;
  useCount: number;
  useType: number;
}

//品牌推荐的接口
interface IBrandList {
  total: Ref<string>;
  list: never[];
  code: number,
  data: {
    list: [
      {
        brandId: number;
        brandName: string;
        id: number;
        recommendStatus: number;
        sort: number;
        keyword?: string
      }
    ];
    pageNum: number;
    pageSize: number;
    total: number;
    totalPage: number;
  };
  message: string;
}

//新品推荐的接口
interface INewProductList {
  total(total: any): number;
  list: never[];
  code: number,
  data: {
    list: [
      {
        id: number;
        productId: number;
        productName: string;
        recommendStatus: number;
        sort: number;
      }
    ];
    pageNum: number;
    pageSize: number;
    total: number;
    totalPage: number;
  };
  message: string;
}

//批量删除品牌的接口
interface IBrandDelete {

  code: number,
  data: {},
  message: string

}

//查询商品的接口
interface IProductList {
  code: number,
  data: {
    list: [
      {
        albumPics: string,
        brandId: number,
        brandName: string,
        deleteStatus: number,
        description: string,
        detailDesc: string,
        detailHtml: string,
        detailMobileHtml: string,
        detailTitle: string,
        feightTemplateId: number,
        giftGrowth: number,
        giftPoint: number,
        id: number,
        keywords: string,
        lowStock: number,
        name: string,
        newStatus: number,
        note: string,
        originalPrice: number,
        pic: string,
        previewStatus: number,
        price: number,
        productAttributeCategoryId: number,
        productCategoryId: number,
        productCategoryName: string,
        productSn: string,
        promotionEndTime: string
        promotionPerLimit: number,
        promotionPrice: number,
        promotionStartTime: string,
        promotionType: number,
        publishStatus: number,
        recommandStatus: number,
        sale: number,
        serviceIds: string,
        sort: number,
        stock: number,
        subTitle: string,
        unit: string,
        usePointLimit: number,
        verifyStatus: number,
        weight: number
      }
    ],
    pageNum: number,
    pageSize: number,
    total: number,
    totalPage: number
  },
  message: string
}

//获取广告详情接口
interface IHomeAdvertise {
  code: number,
  data: {
    clickCount: number,
    endTime: string,
    id: number,
    name: string,
    note: string,
    orderCount: number,
    pic: string,
    sort: number,
    startTime: string,
    status: number,
    type: number,
    url: string
  },
  message: string
}


const addCoupon = (data: IAddCoupon): Promise<IAddCoupon> => {
  return instacne.get("/coupon/create", {
    params: data,
  });
}

interface IAddCouponData {
  children: [
    {
      description: string,
      icon: string,
      id: number,
      keywords: string,
      level: number,
      name: string,
      navStatus: number,
      parentId: number,
      productCount: number,
      productUnit: string,
      showStatus: number,
      sort: number
    }
  ],
  description: string,
  icon: string,
  id: number,
  keywords: string,
  level: number,
  name: string,
  navStatus: number,
  parentId: number,
  productCount: number,
  productUnit: string,
  showStatus: number,
  sort: number
}


// 优惠券标题 /productCategory/list/withChildren
const getTitleLists = (): Promise<IAddCouponData[]> => {
  return instacne.get("/productCategory/list/withChildren")
}
// 获取需要编辑的优惠券
const getOnecoupon = (id: number): Promise<IAddCoupon> => {
  return instacne.get(`/coupon/${id}`)
}
// 修改优惠券
const UpdateOnecoupon = (id: number, data: IAddCoupon): Promise<IAddCoupon> => {
  return instacne.post(`/coupon/update/${id}`, data)
}

interface IqueryCoupon {
  couponId?: number | Ref<number>
  orderSn?: string | Ref<string>
  useStatus?: number | Ref<number>
  pageNum?: number | Ref<number>;
  pageSize?: number | Ref<number>;

}
interface IqueryCouponData {
  list: [
    {
      couponCode: string,
      couponId: number,
      createTime: string,
      getType: number,
      id: number,
      memberId: number,
      memberNickname: string,
      orderId: number,
      orderSn: string,
      useStatus: number,
      useTime: string
    }
  ],
  pageNum: number,
  pageSize: number,
  total: number,
  totalPage: number
}
// 查询具体的优惠券 /couponHistory/list
const queryCouponData = (data?: IqueryCoupon): Promise<IqueryCouponData> => {
  return instacne.get("/couponHistory/list", {
    params: data
  })

}

// 删除对应的优惠券列表 /coupon/delete
const delCouponItem = (data: number): Promise<Object> => {
  return instacne.post("/coupon/delete/" + data)

}
// 退货申请处理列表 returnApply/list
interface IreturnApplyList {
  list: [
    {
      companyAddressId: number,
      createTime: string,
      description: string,
      handleMan: string,
      handleNote: string,
      handleTime: string,
      id: number,
      memberUsername: string,
      orderId: string,
      orderSn: string,
      productAttr: string,
      productBrand: string,
      productCount: number,
      productId: number,
      productName: string,
      productPic: string,
      productPrice: number,
      productRealPrice: number,
      proofPics: string,
      reason: string,
      receiveMan: string,
      receiveNote: string,
      receiveTime: string,
      returnAmount: number,
      returnName: string,
      returnPhone: string,
      status: number
    }
  ],
  pageNum: number,
  pageSize: number,
  total: number,
  totalPage: number
}
interface IreturnApply {
  createTime?: string | Ref<string>
  handleMan?: string | Ref<string>
  handleTime?: string | Ref<string>
  id?: number | Ref<number>
  pageNum?: number | Ref<number>
  pageSize?: number | Ref<number>
  receiverKeyword?: string | Ref<string>
  status?: number | Ref<number>
}

const returnApplyList = (data?: IreturnApply): Promise<IreturnApplyList> => {
  return instacne.get("/returnApply/list", {
    params: data,
  });
}

// /returnApply/delete
const deleteReturnApplyList = (data: number): Promise<IreturnApplyList> => {
  return instacne.get("/returnApply/list?ids=" + data);
}

interface IDataFace {
  companyAddress: {
    addressName: string
    city: boolean
    detailAddress: string
    id: number
    name: string
    phone: string
    province: string
    receiveStatus: number
    region: string
    sendStatus: number
  }
  companyAddressId: number
  createTime: string
  description: string
  handleMan: string
  handleNote: string
  handleTime: string
  id: number
  memberUsername: string
  orderId: number
  orderSn: string
  productAttr: string
  productBrand: string
  productCount: number
  productId: number
  productName: string
  productPic: string
  productPrice: number
  productRealPrice: number
  proofPics: string
  reason: string
  receiveMan: string
  receiveNote: boolean
  receiveTime: string
  returnAmount: number
  returnName: string
  returnPhone: string
  status: number
}

// 单个退回详情数据
let returnApplyitem = (data: number): Promise<IDataFace> => {
  return instacne.get("/returnApply/" + data);
}
// 角色列表 分配菜单
const Distributionmenu = (): Promise<allocMenu> => {
  return instacne.get("/menu/treeList")
}

interface allocMenu {
  createTime: string
  hidden: number
  icon: string
  id: number
  level: number
  name: string
  parentId: number
  sort: number
  title: string
  rawValue: Object
}

interface AdminNum {
  cid?: number
  pageNum: number
  pageSize: number
}
const AdminNumSize = (data: AdminNum | undefined): Promise<IAdminListRes> => {
  console.log(data);

  return instacne.get(`/productAttribute/category/list`, {
    params: {
      pageNum: data?.pageNum,
      pageSize: data?.pageSize,
    }

  })
}
// 添加商品属性/productAttribute/create
interface AdminAddCategory {
  filterType: number,
  handAddStatus: number,
  inputList: string,
  inputType: number,
  name: string,
  productAttributeCategoryId: number,
  relatedStatus: number,
  searchType: number,
  selectType: number,
  sort: number
  type: number
}
const AdminAddItem = (data: AdminAddCategory): Promise<AdminAddCategory> => {
  console.log(data);

  return instacne.post(`/productAttribute/create`, {
    params: {

    }
  })
}
// 商品分类 /productCategory/list
interface AdminAddCategoryList {
  pageNum?: number,
  pageSize?: number,
  parentId?: number,
}
const AdminAddCategoryItem = (data: AdminAddCategoryList): Promise<IAdminListRes> => {

  data.parentId = data.parentId == undefined ? 0 : data.parentId
  console.log(data.parentId);

  return instacne.get(`/productCategory/list/${data.parentId}`, {
    params: {
      pageNum: data?.pageNum,
      pageSize: data?.pageSize,
    }
  })
}


//订单设置
const orderSetting = (data: IOrdersetting): Promise<IOrdersetting> => {
  // console.log(data.id);

  return instacne.get(`/orderSetting/${data.id}`);
  // 优惠券标题 /productCategory/list/withChildren

};
const getTitleList = (): Promise<IAdminInfoRes> => {
  return instacne.get("/productCategory/list/withChildren");
};
//封装品牌推荐请求
const brandlist = (data: IBrandList): Promise<IBrandList> => {
  return instacne.get(`/home/brand/list`, { params: data });
};
//封装新品推荐的请求
const newProduct = (data: INewProductList): Promise<INewProductList> => {
  return instacne.get(`/home/newProduct/list`, {
    params: data
  });
};
//封装广告请求
const homeAdvertise = (data: any): Promise<any> => {
  return instacne.get(`/home/advertise/list`, data);
};
// 添加商品状态栏 /productCategory/update/navStatus
interface navStatus {
  ids: number,
  navStatus: number
}
const navStatusItem = (data: navStatus): Promise<navStatus> => {
  return instacne.post("/productCategory/update/navStatus", qs.stringify(data))
}
// 修改显示状态 /productCategory/update/showStatus
interface showStatus {
  ids: number,
  showStatus: number
}
const showStatusItem = (data: showStatus): Promise<showStatus> => {
  return instacne.post("/productCategory/update/showStatus", qs.stringify(data))
}
// 删除商品 /productCategory/delete/

const deleteStatusItem = (data: number): Promise<showStatus> => {
  console.log(data);
  return instacne.post(`/productCategory/delete/${data}`)
}
// 添加商品 /productAttribute/category/list/withAttr
interface withAttr {
  attributeCount: 0,
  id: number,
  name: string,
  paramCount: number,
  productAttributeList: [
    {
      filterType: number,
      handAddStatus: number,
      id: number,
      inputList: string,
      inputType: number,
      name: string,
      productAttributeCategoryId: number,
      relatedStatus: number,
      searchType: number,
      selectType: number,
      sort: number,
      type: number
    }
  ]
}
const withAttrItem = (): Promise<withAttr> => {
  return instacne.get(`/productAttribute/category/list/withAttr`)
}
// 添加商品 /productCategory/create
interface createAdd {
  description: string,
  icon: string,
  keywords: string,
  name: string,
  navStatus: number,
  parentId: number,
  productAttributeIdList: [
    number
  ],
  productUnit: string,
  showStatus: number,
  sort: number
}
const createAddItem = (data: createAdd): Promise<createAdd> => {
  console.log(data);

  return instacne.post("/productCategory/create", data)
}
// 编辑商品 /productCategory/update/
interface update {
  id: number,
  description: string,
  icon: string,
  keywords: string,
  name: string,
  navStatus: number,
  parentId: number,
  productAttributeIdList: [
    number
  ],
  productUnit: string,
  showStatus: number,
  sort: number
}
const updateAddItem = (data: update): Promise<update> => {
  return instacne.post(`/productCategory/update/${data.id}`)
}
// 品牌管理 /brand/list
interface list {
  keyword?: string | Ref<string>;
  pageNum?: number | Ref<number>;
  pageSize?: number | Ref<number>;
}
const listItem = (data: list): Promise<list> => {
  return instacne.get(`/brand/list?`, {
    params: {
      pageNum: data?.pageNum,
      pageSize: data?.pageSize,
      keyword: data?.keyword
    }
  })
}
const listItemDelete = (id: number): Promise<number> => {
  return instacne.get(`/brand/delete/${id}`)
}
// 添加品牌 /brand/create
interface createItem {
  bigPic: string,
  brandStory: string,
  factoryStatus: number,
  firstLetter: string,
  logo: string,
  name: string,
  showStatus: number,
  sort: number,
  id: number
}

const createItemAdd = (data: createItem): Promise<createItem> => {


  return instacne.post('/brand/create', data)
}
const createItemEdit = (data: number): Promise<createItem> => {
  return instacne.get(`/brand/${data}`)
}
// 编辑商品 /brand/update/
const createItemEdits = (data: createItem): Promise<createItem> => {
  return instacne.post(`/brand/update/${data.id}`, {
    bigPic: data.bigPic,
    brandStory: data.brandStory,
    factoryStatus: data.factoryStatus,
    firstLetter: data.firstLetter,
    logo: data.logo,
    name: data.name,
    showStatus: data.showStatus,
    sort: data.sort,

  })
}

createItemEdit
const editGoods = (data: number): Promise<object> => {
  return instacne.get(`/productCategory/${data}`)
}
// 提交编辑商品 /productCategory/update/
interface updateEdit {
  description: string,
  icon: string,
  keywords: string,
  name: string,
  navStatus: number,
  parentId: number,
  productAttributeIdList: [
    number
  ],
  productUnit: string,
  showStatus: number,
  sort: number,
  id: number,
  productCount: number,
  level: number
}
const updateEditList = (data: updateEdit): Promise<updateEdit> => {
  return instacne.post(`/productCategory/update/${data.id}`, {
    description: data.description,
    icon: data.icon,
    id: data.id,
    keywords: data.keywords,
    level: data.level,
    name: data.name,
    navStatus: data.navStatus,
    parentId: data.parentId,
    productAttributeIdList: data.productAttributeIdList,
    productCount: data.productCount,
    productUnit: data.productUnit,
    showStatus: data.showStatus,
    sort: data.sort
  })
}
// 属性列表删除 productAttribute/delete

const deleteList = (data: number): Promise<object> => {
  console.log(data);

  return instacne.post(`/productAttribute/delete`, qs.stringify({ ids: data }))
}


//文件上传的请求
const minioUpload = (data: IMinioDelete): Promise<IMinioDelete> => {
  return instacne.post(`minio/upload`, data)
}
//批量删除品牌推荐
const brandDelete = (data: IBrandDelete): Promise<IBrandDelete> => {
  return instacne.post(`/home/brand/delete`, data)
}
//查询商品 
const productList = (data: IProductList): Promise<IProductList> => {
  return instacne.get(`/product/list`, data)
}
//获取广告详情的接口
const homeadvertise = (data: IHomeAdvertise): Promise<IHomeAdvertise> => {
  return instacne.get(`/home/advertise`, (data))
}



createItemEdits

// /mall-admin/brand/listAll 获取全部品牌列表
interface listParams {
  keyword?: string | Ref<string>;
  pageNum?: number | Ref<number>;
  pageSize?: number | Ref<number>;
}

interface listAllList {
  bigPic: string,
  brandStory: string,
  factoryStatus: number,
  firstLetter: string,
  id: 0,
  logo: string,
  name: string,
  productCommentCount: number,
  productCount: number,
  showStatus: number,
  sort: number
}
interface listAllRes {
  list: listAllList[],
  pageNum: number,
  pageSize: number,
  total: number,
  totalPage: number
}
const listAll = (data?: listParams | any): Promise<listAllRes> => {
  // console.log(data);
  return instacne.get("/brand/list",
    {
      params: data,
    }
  )
}

// 根据编号查询品牌信息 /mall-admin/brand/{id}
interface ppinfoRes {
  bigPic: string,
  brandStory: string,
  factoryStatus: number
  firstLetter: string,
  id: number,
  logo: string,
  name: string,
  productCommentCount: number,
  productCount: number,
  showStatus: number,
  sort: number
}
const findppinfo = (id: number): Promise<ppinfoRes> => {
  return instacne.get(`/brand/${id}`)
}


export {
  adminLogin, getAdminInfo, getAdminList, adminRegister, adminUpdate, attribute, adminAddForm, adminDeleteForm, adminListbj, returnGoodsAll, changeReturnGoods, changeReturnGoodsStatus, delRouterGoods, adminmsList, couponCouponsList, addCoupon, changeSX, AttributeList, AddGoods, CsList, getAdminallowMenu, getAdminRole, orderSetting, rolesRegister, brandlist, newProduct, homeAdvertise, minioUpload, brandDelete, productList, homeadvertise, adminziyuanList,
  getTitleLists,
  getOnecoupon,
  UpdateOnecoupon,
  queryCouponData,
  delCouponItem,
  returnApplyList,
  Distributionmenu,
  AdminNumSize,
  AdminAddItem,
  AdminAddCategoryItem,
  navStatusItem,
  showStatusItem,
  deleteStatusItem,
  withAttrItem,
  createAddItem,
  updateAddItem,
  listItem,
  listItemDelete,
  createItemAdd,
  createItemEdit,
  createItemEdits,
  editGoods,
  updateEditList,
  deleteList, deleteReturnApplyList,
  returnApplyitem, listAll, findppinfo
};
IAdminListRes
export type {
  IAdminLoginParams, IAdminLoginRes, IAdminListItem, IAdminAdd, IAdminDelete, IAddReturnGoods, IgoodsStatus, IOrdersetting, IAdvertise, IAdminmsList, IAdminMsRes, IAddCoupon, sxdata, AttributeListItiem, AddGoodsItem, getAdminResources, IRoleListItem, IBrandList, INewProductList, IMinioDelete, IBrandDelete, IProductList, IHomeAdvertise, IAdminziyuanRes,
  IAddCouponData,
  IqueryCouponData,
  IreturnApplyList,
  AdminAdd, IAdminListRes,
  navStatus,
  showStatus,
  withAttr,
  createAdd,
  update,
  list,
  createItem,
  AdminAddCategory,
  updateEdit,
  IDataFace,
  listAllRes, ppinfoRes
};


